# Sample summary
## phyloseq-class experiment-level object
## otu_table() OTU Table: [ 13844 taxa and 259 samples ]
## sample_data() Sample Data: [ 259 samples by 39 sample variables ]
## tax_table() Taxonomy Table: [ 13844 taxa by 7 taxonomic ranks ]
estimate OTU richness and evenness for the full community samples.
## [1] 15631
Since our minimum library size is 15,631, we will subsample to 15,000 reads. We will repeat this 100 times and average the diversity estimates from each trial.
Finally, we will plot the two alpha diversity measures in a timeseries using a facet
notes: I need to figure out a way to interpolate temperature and maybe other variables
## 2047 possible subsets (this may take time...)
## No. of variables 1, No. of sets 11... done (0.5%)
## No. of variables 2, No. of sets 55... done (3.2%)
## No. of variables 3, No. of sets 165... done (11.3%)
## No. of variables 4, No. of sets 330... done (27.4%)
## No. of variables 5, No. of sets 462... done (50%)
## No. of variables 6, No. of sets 462... done (72.5%)
## No. of variables 7, No. of sets 330... done (88.7%)
## No. of variables 8, No. of sets 165... done (96.7%)
## No. of variables 9, No. of sets 55... done (99.4%)
## No. of variables 10, No. of sets 11... done (100%)
## No. of variables 11, No. of sets 1... done (100%)
## size
## Turbidity 1
## Temp Turbidity 2
## pH Temp Turbidity 3
## pH Temp Turbidity SRP 4
## pH Temp Turbidity SRP ParMC 5
## pH Temp Turbidity SRP Chla ParMC 6
## pH Temp Turbidity SRP Chla ParMC Phycocyanin 7
## pH Temp Turbidity SRP Ammonia Chla ParMC Phycocyanin 8
## pH Temp Turbidity SRP Nitrate Ammonia Chla ParMC Phycocyanin 9
## pH Temp Turbidity SRP POC Nitrate Ammonia Chla ParMC Phycocyanin 10
## pH Temp Turbidity SRP POC Nitrate Ammonia H2O2 Chla ParMC Phycocyanin 11
## correlation
## Turbidity 0.4590
## Temp Turbidity 0.5383
## pH Temp Turbidity 0.5525
## pH Temp Turbidity SRP 0.5372
## pH Temp Turbidity SRP ParMC 0.5283
## pH Temp Turbidity SRP Chla ParMC 0.5104
## pH Temp Turbidity SRP Chla ParMC Phycocyanin 0.4907
## pH Temp Turbidity SRP Ammonia Chla ParMC Phycocyanin 0.4573
## pH Temp Turbidity SRP Nitrate Ammonia Chla ParMC Phycocyanin 0.4342
## pH Temp Turbidity SRP POC Nitrate Ammonia Chla ParMC Phycocyanin 0.3808
## pH Temp Turbidity SRP POC Nitrate Ammonia H2O2 Chla ParMC Phycocyanin 0.3010
The best model is with three variables: Turbidity, temperature, and pH. I ran a mantel test examining the spearman correlation between the bray-curtis dissimilarity of the samples and the euclidean distance of these three variables
##
## Mantel statistic based on Spearman's rank correlation rho
##
## Call:
## mantel(xdis = bray.sub, ydis = env.dist, method = "spearman")
##
## Mantel statistic r: 0.5525
## Significance: 0.001
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.0856 0.1119 0.1295 0.1592
## Permutation: free
## Number of permutations: 999
Something about this makes me really uncomfortable because this is time series data. I believe jed furhmans lab used a vector for time in a partial mantel. I could try to find the the number of lags that a point seems to depend on and include that in the model. To be discussed.
Adonis test for all three Stations. Note: i removed dates from this analysis where samples were missing from any of the three sites
##
## Call:
## adonis(formula = f, data = metadata)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## Shore 1 0.5971 0.59709 4.9606 0.09262 0.001 ***
## Station 1 0.0718 0.07178 0.5963 0.01113 0.781
## Residuals 48 5.7776 0.12037 0.89624
## Total 50 6.4464 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
There is no generally no autocorrelation lag for cyanobacteria OTUs
There are slightly more heterotrophs that show a one week lag than cyanobacteria . . . how to statistically show this? Would have to account for multiple hypotheses
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: 0.641
## Significance: 0.001
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.177 0.233 0.289 0.333
## Permutation: free
## Number of permutations: 999
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: 0.3397
## Significance: 0.004
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.131 0.176 0.232 0.297
## Permutation: free
## Number of permutations: 999
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: 0.6749
## Significance: 0.001
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.187 0.240 0.292 0.345
## Permutation: free
## Number of permutations: 999
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: 0.5762
## Significance: 0.001
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.205 0.249 0.310 0.350
## Permutation: free
## Number of permutations: 999
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: 0.3519
## Significance: 0.006
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.159 0.204 0.247 0.278
## Permutation: free
## Number of permutations: 999
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: 0.5214
## Significance: 0.001
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.200 0.250 0.289 0.348
## Permutation: free
## Number of permutations: 999
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: 0.4762
## Significance: 0.001
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.187 0.231 0.257 0.287
## Permutation: free
## Number of permutations: 999
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: -0.03799
## Significance: 0.59
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.144 0.191 0.256 0.301
## Permutation: free
## Number of permutations: 999
##
## Mantel statistic based on Pearson's product-moment correlation
##
## Call:
## mantel(xdis = braydist.station, ydis = var.dist)
##
## Mantel statistic r: 0.5005
## Significance: 0.001
##
## Upper quantiles of permutations (null model):
## 90% 95% 97.5% 99%
## 0.165 0.208 0.258 0.318
## Permutation: free
## Number of permutations: 999